import request from '@/utils/request'

export function getRoleList(query) {
  return request({
    url: '/authority/role/getList',
    method: 'post',
    data: query
  })
}
export function getRoleUseable(query) {
  return request({
    url: '/authority/role/getAvailable',
    method: 'post',
    data: query
  })
}

export function getRoleDetail(id) {
  return request({
    url: '/authority/role/getDetail',
    method: 'post',
    data: id 
  })
}

export function saveRole(id) {
  return request({
    url: '/authority/role/save',
    method: 'post',
    data: id
  })
}

export function removeRoleByID(id) {
  return request({
    url: '/authority/role/delete',
    method: 'post',
    data: id
  })
}

export function changeRoleStatusByID(formdata) {
  return request({
    url: '/authority/role/change-status',
    method: 'post',
    data: formdata
  })
}

